1. Field of Invention
This invention relates to a low cost and efficient technique for packing data.
2. Description of Related Art
Data packing is often required when interfacing data from one device to another. For example, image data from a scanner is often output in terms of bytes per pixel where each byte represents 256 gray scale levels. This image data may be output to many other types of devices which may support fewer numbers of bits per pixel. For example, a printer may only support three bits per pixel and thus only the three most significant bits of the image data is used for the printing process. In order to reduce effective bandwidth required to transmit the image data to a device such as a printer and to conserve storage requirements, only the required number of bits per pixel of the image data are packed into output bytes for storage and transmission.
The above described data packing task is made more complex because data packing may be required for varying numbers of bits per pixel. Thus, data packing devices and methods must support many packing combinations such as 1, 2, . . . , or 8 bits per pixel packed into output bytes. Conventional multiplexing techniques is relatively costly and undesirably inefficient. Thus, new technology is required to support such demanding data packing requirements efficiently and at low cost.